"""
外汇爬虫运行脚本
"""
from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings

def main():
    print("🚀 开始爬取招商银行外汇数据...")
    print("=" * 50)
    
    try:
        # 获取项目设置
        process = CrawlerProcess(get_project_settings())
        
        # 启动爬虫
        process.crawl('boc_forex')
        process.start()
        
        print("✅ 外汇数据爬取完成！")
        
    except Exception as e:
        print(f"❌ 爬取过程出现错误: {e}")

if __name__ == '__main__':
    main()